Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Establecer el campo "para" en el formulario de correo electrónico i Dynamics 365

Estoy intentando abrir un nuevo formulario de correo electrónico en Dynamics 365 usando JavaScript. Puedo precompletar fácilmente varios campos como "Respecto a", pero cuando trato de completar el campo "Para", simplemente sale vacío.

Aquí hay un pequeño fragmento de código que reproduce mi problema:

 let contactid = "91be7fec-2142-ec11-8c62-000d3ac23084"; let activityParameters = {}; // Set the regarding field -- this works! activityParameters["regardingobjectid"] = contactid ; activityParameters["regardingobjectidname"] = "Regarding your last email"; activityParameters["regardingobjectidtype"] = "contact"; // Set the to field -- this is not working! var parties = []; var receiver = {}; receiver["partyid_contact@odata.bind"] = `/contacts(${contactid})`; receiver["participationtypemask"] = 2; //To parties.push(receiver); activityParameters["email_activity_parties"] = parties; await window.parent.Xrm.Navigation.navigateTo( { pageType: "entityrecord", entityName: "email", data: activityParameters }, { target: 2 } // Open in modal )

También probé algunas variaciones basadas en cómo se configuran las búsquedas en otros lugares, como:

 var parties = []; var receiver = { activityparty: { id: contactid, entityType: "contact", name: "XXX" }, participationtypemask: 2 };

Buscar en Google el problema solo me dio soluciones para crear correos electrónicos usando la API web (como lo intenté anteriormente), pero no estoy seguro de cómo cambiar el código para que navigateTo() reconozca el parámetro.

¿Alguien tiene una idea de cómo hacer esto?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Finalmente lo resolví. Andrew Butenko describió cómo hacerlo para openForm() , y resulta que la misma solución también se puede aplicar para navigateTo() .

Dejo mi solución aquí en caso de que alguien más tenga el mismo problema.

 let contactid = "91be7fec-2142-ec11-8c62-000d3ac23084"; let activityParameters = {};​ // Set the to field -- this IS working! activityParameters["to"] = [{ id: contactid, name: "Contact Name Here", entityType: "contact" }]; await window.parent.Xrm.Navigation.navigateTo( { pageType: "entityrecord", entityName: "email", data: activityParameters }, { target: 2 } // Open in modal );
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!